package be.novelfaces.component.panel;

import javax.faces.component.UIComponentBase;

import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.Description;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;

import be.novelfaces.component.properties.FormEventProperties;
import be.novelfaces.component.properties.GlobalProperties;
import be.novelfaces.component.properties.KeyboardEventProperties;
import be.novelfaces.component.properties.MouseEventProperties;

@JsfComponent(tag = @Tag(type = TagType.Facelets, name = "panel"), //
type = AbstractPanel.COMPONENT_TYPE, //
family = AbstractPanel.COMPONENT_FAMILY, //
generate = "be.novelfaces.component.panel.Panel", //
renderer = @JsfRenderer(type = AbstractPanel.DEFAULT_RENDERER))
public abstract class AbstractPanel extends UIComponentBase implements
		KeyboardEventProperties, GlobalProperties, MouseEventProperties,
		FormEventProperties {

	public static final String COMPONENT_TYPE = "be.novelfaces.component.Panel";
	public static final String COMPONENT_FAMILY = "be.novelfaces.component";
	public static final String DEFAULT_RENDERER = "be.novelfaces.component.PanelRenderer";

	@Attribute(description = @Description(value = "<p>This represents the type of the panel.</p>" //
			+ "<p>Possible values are:</p>" //
			+ "<ul>" //
			+ "<li>span - Default. The span tag is used to group inline-elements in a document.</li>" //
			+ "<li>div - The div tag defines a division or a section in an HTML document.</li>" //
			+ "<li>address - The address tag defines the contact information for the author or owner of a document.</li>" //
			+ "<li>article - The article tag specifies independent, self-contained content.</li>" //
			+ "<li>aside - The aside tag defines some content aside from the content it is placed in.</li>" //
			+ "<li>section - The section tag defines sections in a document. Such as chapters, headers, footers, or any other sections of the document.</li>" //
			+ "<li>hgroup - The hgroup tag specifies the heading of a section or a document.</li>" //
			+ "<li>header - The header tag specifies an introduction, or a group of navigation elements for the document.</li>" //
			+ "<li>footer - The footer tag defines the footer of a section or document. Typically contains the name of the author, the date the document was written and/or contact information.</li>" //
			+ "<li>h1 to h6 - The h1 to h6 tags define headers. h1 defines the most important heading. h6 defines the least important heading.</li>" //
			+ "</ul>" //
			+ "<p>When some other value is given for the type attribute then it falls back to a span.</p>", //
	displayName = "type"), defaultValue="span")
	public abstract String getType();

}
